package com.swe.chums.dao.model;

import com.swe.chums.dao.*;
import com.swe.chums.dao.factory.*;
import com.swe.chums.dao.exceptions.*;
import java.io.Serializable;
import java.util.*;

public class CommentLike implements Serializable
{
	/** 
	 * This attribute maps to the column id in the comment_like table.
	 */
	protected int id;

	/** 
	 * This attribute maps to the column comment_id in the comment_like table.
	 */
	protected int commentId;

	/** 
	 * This attribute maps to the column user_id in the comment_like table.
	 */
	protected int userId;

	/**
	 * Method 'CommentLike'
	 * 
	 */
	public CommentLike()
	{
	}

	/**
	 * Method 'getId'
	 * 
	 * @return int
	 */
	public int getId()
	{
		return id;
	}

	/**
	 * Method 'setId'
	 * 
	 * @param id
	 */
	public void setId(int id)
	{
		this.id = id;
	}

	/**
	 * Method 'getCommentId'
	 * 
	 * @return int
	 */
	public int getCommentId()
	{
		return commentId;
	}

	/**
	 * Method 'setCommentId'
	 * 
	 * @param commentId
	 */
	public void setCommentId(int commentId)
	{
		this.commentId = commentId;
	}

	/**
	 * Method 'getUserId'
	 * 
	 * @return int
	 */
	public int getUserId()
	{
		return userId;
	}

	/**
	 * Method 'setUserId'
	 * 
	 * @param userId
	 */
	public void setUserId(int userId)
	{
		this.userId = userId;
	}

	/**
	 * Method 'equals'
	 * 
	 * @param _other
	 * @return boolean
	 */
	public boolean equals(Object _other)
	{
		if (_other == null) {
			return false;
		}
		
		if (_other == this) {
			return true;
		}
		
		if (!(_other instanceof CommentLike)) {
			return false;
		}
		
		final CommentLike _cast = (CommentLike) _other;
		if (id != _cast.id) {
			return false;
		}
		
		if (commentId != _cast.commentId) {
			return false;
		}
		
		if (userId != _cast.userId) {
			return false;
		}
		
		return true;
	}

	/**
	 * Method 'hashCode'
	 * 
	 * @return int
	 */
	public int hashCode()
	{
		int _hashCode = 0;
		_hashCode = 29 * _hashCode + id;
		_hashCode = 29 * _hashCode + commentId;
		_hashCode = 29 * _hashCode + userId;
		return _hashCode;
	}

	/**
	 * Method 'createPk'
	 * 
	 * @return CommentLikePk
	 */
	public CommentLikePk createPk()
	{
		return new CommentLikePk(id);
	}

	/**
	 * Method 'toString'
	 * 
	 * @return String
	 */
	public String toString()
	{
		StringBuffer ret = new StringBuffer();
		ret.append( "com.swe.chums.dao.dto.CommentLike: " );
		ret.append( "id=" + id );
		ret.append( ", commentId=" + commentId );
		ret.append( ", userId=" + userId );
		return ret.toString();
	}

}
